const curry = (fn,...args) => 
    args.length >= fn.length
    ? fn(...args)
    : (..._args) => curry(fn,...args,..._args)

function spliceUrl(protocol,hostname,patchname) {
    return `${protocol}${hostname}${patchname}`
}
// 复用性
const url1 = spliceUrl('https://','juejin.cn','/post/6978685539985653767/')

const curriedSpliceUrl = curry(spliceUrl, 'https://','juejin.cn')
console.log(curriedSpliceUrl('/post/6978685539985653767/'));